﻿import kliment.events.Event;

/**
 * ...
 * @author Kliment
 */
class kliment.events.ProgressEvent extends Event {
	static public var PROGRESS:String = "progress";
	
	private var _bytesLoaded:Number;
	private var _bytesTotal:Number;
	
	public function ProgressEvent(type:String, target:Object, bytesLoaded:Number, bytesTotal:Number) {
		super(type, target);
		_bytesLoaded = bytesLoaded;
		_bytesTotal = bytesTotal;
	}
	
	public function get bytesLoaded():Number { return _bytesLoaded; }
	
	public function get bytesTotal():Number { return _bytesTotal; }
	
	public function toString():String {
		return "[ProgressEvent type=" + _type + " target=" + _target + " bytesLoaded = " + _bytesLoaded + " bytesTotal = " + _bytesTotal +"]";
	}
	
	public function clone():ProgressEvent {
		return new ProgressEvent(_type, _target, _bytesLoaded, _bytesTotal);
	}
	
}